#include <cstdlib>
#include <iostream>
#include "BitStrings.h"

using namespace std;

int main(int argc, char *argv[])
{
    BitString theBitStrings[9];
    
    int i;
    
    for(i = 0; i < 9; i++)
    {
          theBitStrings[i] = *CreateBitString(3);
          
          theBitStrings[i].bits[0] = '1';
          theBitStrings[i].bits[1] = '0';
          theBitStrings[i].bits[2] = '1';
    }
    
    
    int* theInts;
    int numInts;
    
    BitStringToInt(theBitStrings, 9, &theInts, &numInts);

    for(i = 0; i < numInts; i++)
    {
          printf("theInts[%d]=%d\n", i, theInts[i]);
    }
    
    free(theInts);
    for(i = 0; i < 9; i++)
          DestroyBitString(&theBitStrings[i]);
    
    system("PAUSE");
    return EXIT_SUCCESS;
}
